package com.hoki.zj.hrm.client;

import com.hoki.zj.hrm.doc.CourseDoc;
import com.hoki.zj.hrm.utils.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/es/course")
@FeignClient(value = "HRM-SEARCH", fallbackFactory = CourseESClientFallbackFactory.class)
public interface CourseESClient {

    /**
     * 1.ElasticSearch添加/修改
     */
    @PostMapping("/save")
    AjaxResult save(@RequestBody CourseDoc courseDoc);

    /**
     * 2.ElasticSearch删除
     */
    @DeleteMapping("/{id}")
    AjaxResult del(@PathVariable("id") Long id);
}
